[IDLE-000] 센터장은 공고 지원자를 확인할 수 있다. #49
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
변경된점
시현 영상
계층별 데이터 변환 형식
서버로부터 받아온 데이터를 기존의 코드에서는 다소 모호한 책임 분배가 있었다.
예를들어 서버로부터 "MAN"이라는 데이터가 떨어지는 경우
MAN 은 Entitiy은 Gender로 Repository에서 변경후 반환한다. 그후 UI에서 해당 데이터를 "남성"으로 변경되게된다.
급여양의 경우는 다소 복잡한 변형이 필요했다.
Data, 서버로 부터 온 값: 10000(Int)
Domain, Entity변환: 10,000(String)
Presentation, 랜더오브젝트로 변환: 10,000원
문제는 도메인 단에서 정수형을 문자열로 바꾸고 중간에 컴마를 삽입해서 발생했다.

공고를 수정하는 경우 서버로 부터 정수형으로 값을 전달해야한다.
그런데 수정을 하기위해선 기존의 값이 필요하다.
기존의 값이 변형된 문자열이라 유저 입장에서 숫자가 아닌 컴마가 입력창에 있는 것을 확인할 수 있다.
따라서 디스플레이에 필요한 로직을 Presentation으로 옮길 필요가 있었다.
엔티티를 RO로변경하는 부분에 해당 로직을 두어 문제를 해결할 수 있었다.
이번 기회에 확실하게 룰을 정해야겠다.